<%@ page import="java.util.ArrayList" %>
<%@ page import="com.wy.bean.User" %><%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/9/24/024
  Time: 15:45
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>用户列表</title>
</head>
<body>
<table cellpadding="1px" cellspacing="1px">
    <tr><th>用户名</th><th>IP</th><th>登录时间</th><th>操作</th></tr>
    <%
        ArrayList<User> userList = (ArrayList<User>) request.getServletContext().getAttribute("userList");

        for (int i = 0; i < userList.size(); i++) {
            User user = userList.get(i);%>

    <tr><td><%=user.getUsername()%></td><td><%=user.getIP()%></td><td><%=user.getLoginTime()%></td><td>提出</td></tr>
    <%
        }
    %>

</table>
</body>
</html>
